CREATE TABLE [dbo].[TblVillage]
(
[ID] [uniqueidentifier] NOT NULL,
[VillageCode] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Name] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Khanevar] [int] NULL,
[Population] [int] NULL,
[DehstanId] [uniqueidentifier] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
ALTER TABLE [dbo].[TblVillage] ADD
CONSTRAINT [FK_TblVillage_TblDehestan] FOREIGN KEY ([DehstanId]) REFERENCES [dbo].[TblDehestan] ([ID]) ON DELETE CASCADE ON UPDATE CASCADE

GO
ALTER TABLE [dbo].[TblVillage] ADD CONSTRAINT [PK_TblVillage] PRIMARY KEY CLUSTERED  ([ID]) ON [PRIMARY]
GO
